package d4_thread_safe;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 2024/6/23 线程类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DrawThread extends Thread{
    private Account acc;
    public  DrawThread(Account acc,String name){
        super(name);
        this.acc=acc;
    }
    @Override
    public void run() {
        //取钱
   acc.drawaMoney(10000);

    }


}
